package main

import (
	"fmt"
	"reflect"
)

type User struct {
	Name string "xingming"
	Age  int    "age"
}

func main() {
	u := User{"Tom", 23}
	t := reflect.TypeOf(u)
	v := reflect.ValueOf(u)

	for i := 0; i < t.NumField(); i++ {
		f := t.Field(i)
		fmt.Printf("%s (%s=%v)\n", f.Tag, f.Name,
			v.Field(i).Interface())
	}
}
